<?php

defined('SYSPATH') or die('No direct access allowed.');

class Model_Rookeeaccount extends ORM {

    public function rules() {
        return array(
            'username' => array(
                array('not_empty'),
                array('email'),
                array('min_length', array(':value', 4)),
                array('max_length', array(':value', 32)),
            ),
            'password' => array(
                array('not_empty'),
                array('min_length', array(':value', 4)),
                array('max_length', array(':value', 32)),
            ),
        );
    }

    public function filters() {
        return array(
            'username' => array(
                array('trim'),
                array('strtolower'),
            ),
            'password' => array(
                array('trim'),
            )
        );
    }

}